home *** CD-ROM | disk | FTP | other *** search
/ C/C++ Users Group Library 1996 July / C-C++ Users Group Library July 1996.iso / vol_400 / 419_01 / odmg10 / config / Library.tmpl < prev    next >
Encoding:
Text File  |  1993-05-31  |  3.0 KB  |  108 lines

  1. /*
  2.  * Library imakefile info  - this contains any special redefinitions, etc.
  3.  * that Imakefiles in the various library subtrees will need.
  4.  *
  5.  * Before including this, you must set the following boolean variables:
  6.  * DoNormalLib, DoSharedLib, DoDebugLib, DoProfileLib
  7.  */
  8.  
  9. XCOMM $XConsortium: Library.tmpl,v 1.11 91/07/27 13:10:13 rws Exp $
  10.  
  11. #ifndef LibraryCcCmd
  12. #if DoSharedLib && defined(SharedLibraryCcCmd)
  13. #define LibraryCcCmd SharedLibraryCcCmd
  14. #else
  15. #define LibraryCcCmd CcCmd
  16. #endif
  17. #endif
  18. #ifndef LibraryCCOptions
  19. #if DoSharedLib && defined(SharedLibraryCCOptions)
  20. #define LibraryCCOptions SharedLibraryCCOptions
  21. #else
  22. #define LibraryCCOptions DefaultCCOptions
  23. #endif
  24. #endif
  25. #ifndef LibraryDefines
  26. #define LibraryDefines StandardDefines
  27. #endif
  28. #ifndef LibraryCDebugFlags
  29. #define LibraryCDebugFlags OptimizedCDebugFlags
  30. #endif
  31. #ifndef AvoidNullMakeCommand
  32. #define AvoidNullMakeCommand NO
  33. #endif
  34. #if AvoidNullMakeCommand
  35. _NULLCMD_ = @ echo -n
  36. #endif
  37.  
  38.          CC = LibraryCcCmd
  39.   CCOPTIONS = LibraryCCOptions
  40. STD_DEFINES = LibraryDefines
  41. CDEBUGFLAGS = LibraryCDebugFlags
  42.  
  43. #if DoDebugLib
  44. #define _DebuggedLibMkdir() LibMkdir(debugger)
  45. #define _DebuggedObjCompile(options) DebuggedLibObjCompile(options)
  46. #define _DebuggedCleanDir() LibCleanDir(debugger)
  47. #else
  48. #define _DebuggedLibMkdir() $(_NULLCMD_)
  49. #define _DebuggedObjCompile(options) $(_NULLCMD_)
  50. #define _DebuggedCleanDir() $(_NULLCMD_)
  51. #endif
  52.  
  53. #if DoProfileLib
  54. #define _ProfiledLibMkdir() LibMkdir(profiled)
  55. #define _ProfiledObjCompile(options) ProfiledLibObjCompile(options)
  56. #define _ProfiledCleanDir() LibCleanDir(profiled)
  57. #else
  58. #define _ProfiledLibMkdir() $(_NULLCMD_)
  59. #define _ProfiledObjCompile(options) $(_NULLCMD_)
  60. #define _ProfiledCleanDir() $(_NULLCMD_)
  61. #endif
  62.  
  63. #if DoSharedLib && DoNormalLib
  64. #define _SharedLibMkdir() LibMkdir(shared)
  65. #define _SharedObjCompile(options) SharedLibObjCompile(options)
  66. #define _SharedCleanDir() LibCleanDir(shared)
  67. #else
  68. #define _SharedLibMkdir() $(_NULLCMD_)
  69. #define _SharedObjCompile(options) $(_NULLCMD_)
  70. #define _SharedCleanDir() $(_NULLCMD_)
  71. #endif
  72.  
  73. #if DoSharedLib && !DoNormalLib
  74. #define _NormalObjCompile(options) NormalSharedLibObjCompile(options)
  75. #else
  76. #define _NormalObjCompile(options) NormalLibObjCompile(options)
  77. #endif
  78.  
  79. #ifndef LibraryObjectRule
  80. #define LibraryObjectRule()                        @@\
  81. all::                                    @@\
  82.     _DebuggedLibMkdir()                        @@\
  83.     _ProfiledLibMkdir()                        @@\
  84.     _SharedLibMkdir()                        @@\
  85.                                     @@\
  86. .c.o:                                    @@\
  87.     _DebuggedObjCompile($(_NOOP_))                    @@\
  88.     _ProfiledObjCompile($(_NOOP_))                    @@\
  89.     _SharedObjCompile($(_NOOP_))                    @@\
  90.     _NormalObjCompile($(_NOOP_))                    @@\
  91.                                     @@\
  92. clean::                                    @@\
  93.     _DebuggedCleanDir()                        @@\
  94.     _ProfiledCleanDir()                        @@\
  95.     _SharedCleanDir()                        @@\
  96.  
  97. #endif /* LibraryObjectRule */
  98.  
  99. #ifndef SpecialLibObjectRule
  100. #define SpecialLibObjectRule(objs,depends,options)            @@\
  101. objs: depends                                @@\
  102.     _DebuggedObjCompile(options)                    @@\
  103.     _ProfiledObjCompile(options)                    @@\
  104.     _SharedObjCompile(options)                    @@\
  105.     _NormalObjCompile(options)                    @@\
  106.  
  107. #endif /* SpecialLibObjectRule */
  108.